<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<button onclick="speak()">按钮</button>

<script>
    function speak() {
        let speech=new SpeechSynthesisUtterance("你好世界");
        speechSynthesis.speak(speech);

    }
</script>
</body>
</html>